<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "crm_mall_order".
 *
 * @property int $id
 * @property string $shr 收货人
 * @property string $shryx 收货人邮箱
 * @property string $shryb 收货人邮编
 * @property string $shrdh 收货人电话
 * @property array $sfcsqx 省份/城市/区县
 * @property string $xxdz 详细地址
 * @property string $bz 备注
 * @property string $qhcl 缺货处理（方式）
 * @property string $spxq 商品详情
 * @property string $ddbh 订单编号
 * @property string $ddzt 订单状态
 * @property string $pszt 配送状态
 * @property string $zfzt 支付状态
 * @property string $fklx 付款类型
 * @property string $xdsj 下单时间
 * @property string $zje 总金额
 * @property string $zzk 总折扣
 * @property string $zzsjf 总赠送积分
 * @property string $zzfjf 总支付积分
 * @property int $gsid 归属id
 */
class CrmMallOrder extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'crm_mall_order';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['sfcsqx'], 'safe'],
            [['gsid'], 'integer'],
            [['shr', 'shrdh', 'qhcl', 'ddzt', 'pszt', 'zfzt', 'zje', 'zzk', 'zzsjf', 'zzfjf'], 'string', 'max' => 20],
            [['shryx'], 'string', 'max' => 100],
            [['shryb', 'fklx'], 'string', 'max' => 6],
            [['xxdz', 'ddbh'], 'string', 'max' => 30],
            [['bz', 'spxq'], 'string', 'max' => 255],
            [['xdsj'], 'string', 'max' => 12],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'shr' => '收货人',
            'shryx' => '收货人邮箱',
            'shryb' => '收货人邮编',
            'shrdh' => '收货人电话',
            'sfcsqx' => '省份/城市/区县',
            'xxdz' => '详细地址',
            'bz' => '备注',
            'qhcl' => '缺货处理（方式）',
            'spxq' => '商品详情',
            'ddbh' => '订单编号',
            'ddzt' => '订单状态',
            'pszt' => '配送状态',
            'zfzt' => '支付状态',
            'fklx' => '付款类型',
            'xdsj' => '下单时间',
            'zje' => '总金额',
            'zzk' => '总折扣',
            'zzsjf' => '总赠送积分',
            'zzfjf' => '总支付积分',
            'gsid' => '归属id',
        ];
    }
}
